package testview.zhen.com.myapplication.design.consumer_producer;

/**
 * Create by ldr
 * on 2019/8/23 17:14.
 */
public abstract class AbstractProducer implements Runnable,Producer {

    @Override
    public void run() {
        while (true){
            try {
                proudce();
            }
            catch (InterruptedException e) {
                System.out.println(Thread.currentThread().getName()+"中断了");
                e.printStackTrace();
                break;
            }
        }
    }
}
